package com.zshan.clinic.database.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ClinicNoticeLastReadExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public ClinicNoticeLastReadExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andReadIdIsNull() {
            addCriterion("read_id is null");
            return (Criteria) this;
        }

        public Criteria andReadIdIsNotNull() {
            addCriterion("read_id is not null");
            return (Criteria) this;
        }

        public Criteria andReadIdEqualTo(Long value) {
            addCriterion("read_id =", value, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdNotEqualTo(Long value) {
            addCriterion("read_id <>", value, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdGreaterThan(Long value) {
            addCriterion("read_id >", value, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdGreaterThanOrEqualTo(Long value) {
            addCriterion("read_id >=", value, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdLessThan(Long value) {
            addCriterion("read_id <", value, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdLessThanOrEqualTo(Long value) {
            addCriterion("read_id <=", value, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdIn(List<Long> values) {
            addCriterion("read_id in", values, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdNotIn(List<Long> values) {
            addCriterion("read_id not in", values, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdBetween(Long value1, Long value2) {
            addCriterion("read_id between", value1, value2, "readId");
            return (Criteria) this;
        }

        public Criteria andReadIdNotBetween(Long value1, Long value2) {
            addCriterion("read_id not between", value1, value2, "readId");
            return (Criteria) this;
        }

        public Criteria andEmpIdIsNull() {
            addCriterion("emp_id is null");
            return (Criteria) this;
        }

        public Criteria andEmpIdIsNotNull() {
            addCriterion("emp_id is not null");
            return (Criteria) this;
        }

        public Criteria andEmpIdEqualTo(Long value) {
            addCriterion("emp_id =", value, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdNotEqualTo(Long value) {
            addCriterion("emp_id <>", value, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdGreaterThan(Long value) {
            addCriterion("emp_id >", value, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdGreaterThanOrEqualTo(Long value) {
            addCriterion("emp_id >=", value, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdLessThan(Long value) {
            addCriterion("emp_id <", value, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdLessThanOrEqualTo(Long value) {
            addCriterion("emp_id <=", value, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdIn(List<Long> values) {
            addCriterion("emp_id in", values, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdNotIn(List<Long> values) {
            addCriterion("emp_id not in", values, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdBetween(Long value1, Long value2) {
            addCriterion("emp_id between", value1, value2, "empId");
            return (Criteria) this;
        }

        public Criteria andEmpIdNotBetween(Long value1, Long value2) {
            addCriterion("emp_id not between", value1, value2, "empId");
            return (Criteria) this;
        }

        public Criteria andLastMsgIsNull() {
            addCriterion("last_msg is null");
            return (Criteria) this;
        }

        public Criteria andLastMsgIsNotNull() {
            addCriterion("last_msg is not null");
            return (Criteria) this;
        }

        public Criteria andLastMsgEqualTo(String value) {
            addCriterion("last_msg =", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgNotEqualTo(String value) {
            addCriterion("last_msg <>", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgGreaterThan(String value) {
            addCriterion("last_msg >", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgGreaterThanOrEqualTo(String value) {
            addCriterion("last_msg >=", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgLessThan(String value) {
            addCriterion("last_msg <", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgLessThanOrEqualTo(String value) {
            addCriterion("last_msg <=", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgLike(String value) {
            addCriterion("last_msg like", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgNotLike(String value) {
            addCriterion("last_msg not like", value, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgIn(List<String> values) {
            addCriterion("last_msg in", values, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgNotIn(List<String> values) {
            addCriterion("last_msg not in", values, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgBetween(String value1, String value2) {
            addCriterion("last_msg between", value1, value2, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgNotBetween(String value1, String value2) {
            addCriterion("last_msg not between", value1, value2, "lastMsg");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeIsNull() {
            addCriterion("last_msg_time is null");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeIsNotNull() {
            addCriterion("last_msg_time is not null");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeEqualTo(Date value) {
            addCriterion("last_msg_time =", value, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeNotEqualTo(Date value) {
            addCriterion("last_msg_time <>", value, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeGreaterThan(Date value) {
            addCriterion("last_msg_time >", value, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("last_msg_time >=", value, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeLessThan(Date value) {
            addCriterion("last_msg_time <", value, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeLessThanOrEqualTo(Date value) {
            addCriterion("last_msg_time <=", value, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeIn(List<Date> values) {
            addCriterion("last_msg_time in", values, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeNotIn(List<Date> values) {
            addCriterion("last_msg_time not in", values, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeBetween(Date value1, Date value2) {
            addCriterion("last_msg_time between", value1, value2, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgTimeNotBetween(Date value1, Date value2) {
            addCriterion("last_msg_time not between", value1, value2, "lastMsgTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeIsNull() {
            addCriterion("last_read_time is null");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeIsNotNull() {
            addCriterion("last_read_time is not null");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeEqualTo(Date value) {
            addCriterion("last_read_time =", value, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeNotEqualTo(Date value) {
            addCriterion("last_read_time <>", value, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeGreaterThan(Date value) {
            addCriterion("last_read_time >", value, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("last_read_time >=", value, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeLessThan(Date value) {
            addCriterion("last_read_time <", value, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeLessThanOrEqualTo(Date value) {
            addCriterion("last_read_time <=", value, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeIn(List<Date> values) {
            addCriterion("last_read_time in", values, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeNotIn(List<Date> values) {
            addCriterion("last_read_time not in", values, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeBetween(Date value1, Date value2) {
            addCriterion("last_read_time between", value1, value2, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andLastReadTimeNotBetween(Date value1, Date value2) {
            addCriterion("last_read_time not between", value1, value2, "lastReadTime");
            return (Criteria) this;
        }

        public Criteria andUnreadNumIsNull() {
            addCriterion("unread_num is null");
            return (Criteria) this;
        }

        public Criteria andUnreadNumIsNotNull() {
            addCriterion("unread_num is not null");
            return (Criteria) this;
        }

        public Criteria andUnreadNumEqualTo(Integer value) {
            addCriterion("unread_num =", value, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumNotEqualTo(Integer value) {
            addCriterion("unread_num <>", value, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumGreaterThan(Integer value) {
            addCriterion("unread_num >", value, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("unread_num >=", value, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumLessThan(Integer value) {
            addCriterion("unread_num <", value, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumLessThanOrEqualTo(Integer value) {
            addCriterion("unread_num <=", value, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumIn(List<Integer> values) {
            addCriterion("unread_num in", values, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumNotIn(List<Integer> values) {
            addCriterion("unread_num not in", values, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumBetween(Integer value1, Integer value2) {
            addCriterion("unread_num between", value1, value2, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andUnreadNumNotBetween(Integer value1, Integer value2) {
            addCriterion("unread_num not between", value1, value2, "unreadNum");
            return (Criteria) this;
        }

        public Criteria andClinicIdIsNull() {
            addCriterion("clinic_id is null");
            return (Criteria) this;
        }

        public Criteria andClinicIdIsNotNull() {
            addCriterion("clinic_id is not null");
            return (Criteria) this;
        }

        public Criteria andClinicIdEqualTo(Long value) {
            addCriterion("clinic_id =", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdNotEqualTo(Long value) {
            addCriterion("clinic_id <>", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdGreaterThan(Long value) {
            addCriterion("clinic_id >", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdGreaterThanOrEqualTo(Long value) {
            addCriterion("clinic_id >=", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdLessThan(Long value) {
            addCriterion("clinic_id <", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdLessThanOrEqualTo(Long value) {
            addCriterion("clinic_id <=", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdIn(List<Long> values) {
            addCriterion("clinic_id in", values, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdNotIn(List<Long> values) {
            addCriterion("clinic_id not in", values, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdBetween(Long value1, Long value2) {
            addCriterion("clinic_id between", value1, value2, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdNotBetween(Long value1, Long value2) {
            addCriterion("clinic_id not between", value1, value2, "clinicId");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("update_time is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("update_time is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("update_time =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("update_time <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("update_time >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("update_time >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("update_time <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("update_time <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("update_time in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("update_time not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("update_time between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("update_time not between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andLastMsgLikeInsensitive(String value) {
            addCriterion("upper(last_msg) like", value.toUpperCase(), "lastMsg");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}